import * as types from './mutation_types';

export default {
  //改变当前主题id
  [types.CONTENT_TITLTE](state,id){
    console.log(id)
    state.conntent_titlte = id;
  },
  [types.UNREAD_MESSAGE_NUMBER](state,number){
    state.unreadMessageNumber = number;
  },
  [types.CHAT_OBJECT](state,chatObject){
    state.chatObject = chatObject;
  },
  [types.USER_LIST](state,chatList){
    state.chatList = chatList;
  },
  [types.PERSON_INFOR](state,personInfor){
    state.personInfor = personInfor;
  },
  [types.USERLIST_FLAG](state,flag){
    state.userListFlag = flag;
  },
  [types.CHAT_CONTENT](state,chatItem){
    if(chatItem.length===0){
      state.chatContent = [];
    }else{
      state.chatContent = state.chatContent.concat(chatItem);
    }

  }

}
